﻿@model Questions
@{
    ViewBag.Title = Model.Title;
}

<script src="@Url.Content("~/scripts/ASK/Detail.js")" type="text/javascript"></script>
<script src="@Url.Content("~/scripts/Libs/jQuery.PoshyTip/jquery.poshytip.min.js")" type="text/javascript"></script>

@Html.Stylesheet("~/styles/ASK/main.css")
@Html.Stylesheet("~/styles/ASK/Detail.css")
@Html.Stylesheet("~/styles/Libs/jQuery.PoshyTip/tip-yellow/tip-yellow.css")

<ul class="path floatContainer">
	<li class="first">@Html.ActionLinkLocalized("途丫问答", "List", "Ask")</li>
	<li>@Html.ActionLink(Model.Title, "Detail", "Ask", new { id = Model.Id, pageNum = 1 }, null)</li>
</ul>

<div class="main">
  <div class="ask_wp">
        <div class="ask_top_detail">
        <h2>
            <a href="@Url.Action("List","Ask")"><img src="@Url.Content("~/styles/ASK/images/ask_title_txt.png")" alt="途丫问答" title="i途丫问答"></a>
        </h2>

        <div class="ask_search_main">
              <div class="ask_search_text">
				<input id="type" name="type" type="hidden" value="orther">
				<form action="/search" method="get" id="formsearch">
                    <input id="keyword" name="q" type="text" style="width: 420px; color: rgb(149, 149, 149); " value="" placeholder="提问前请先搜索，看看你的问题其他穷游er是否已经问过" class="ui_input" autocomplete="off">
                    <input type="button" value=" " onclick="if($.trim($('#keyword').val())!='' &amp;&amp; $.trim($('#keyword').val())!='提问前请先搜索，看看你的问题其他穷游er是否已经问过'){$('#formsearch').submit();}" class="ask_button">
				</form>
				<div id="search_menu"></div>
            </div>		
        </div>

        <div class="ask_alltag fl">
        	<a href="@Url.Action("AllTags","Ask")">全部标签</a>
        </div>

        <div class="ask_askhelp_btn">
            <a rel="nofollow" href="@Url.Action("AddQuestion","Ask")"><img src="@Url.Content("~/styles/ASK/images/ask_addask_btn.png")"/></a>
        </div>

        </div>

        <div class="ask_item mt20">
            <div class="ask_sidebar fr">
                <div class="ask_detail_yes">
                    <div class="ask_detail_click" id="jsshowattennum">
                        <a href="javascript:;" id="jsaddquestionatten" value="231571">同问+1</a><strong class="fb">@Model.Voted</strong> 人有同样问题
					</div>

                </div>

                <div class="ask_detail_do mt20">
            	    <h4 class="f14 fb cGray">相关问题</h4>
                    <ul class="mt5 clearfix">

                    </ul>
                </div>
                <div class="ask_detail_do mt20">
                    <h4 class="f14 fb cGray">推荐问题</h4>
                    <ul class="mt5 clearfix">

                    </ul>
                </div>
                <div class="ask_detail_place mt20">
            	    <h4 class="f14 fb cGray">相关目的地</h4>
                    <ul class="mt5 clearfix">
                    </ul>
                 </div>
                
            </div>

            <div class="ask_item_main fl">
                <div class="ask_detail_item clearfix">
                    <div class="ui_headPort" alt="@Model.User.Id">
            		<a href="@Url.Action("Detail", "Users", new { id = Model.User.Id })" class="fl">
                        <img src="@Model.User.Photo" width="80" height="80" alt="@Model.User.UserName" title="@Model.User.UserName">
                    </a>
                    </div>
                    <div class="ask_detail_content">
                        <h2 class="ask_detail_content_title">@Model.Title</h2>
                        <div class="ask_detail_content_text">@Model.Description</div>
                        <div class="ask_detail_content_tag mt5">
                        @*Tags list include href*@
                        </div>
                        <div class="dashed1px mt5"></div>
                        <div class="clearfix mt10">
                    	    <p class="fl">
                                @Html.ActionLink(Model.User.UserName,"Detail","Users") | @Model.PublishDate.ToString("yyyy-MM-dd HH:mm")  
                            </p>
                    	    <span class="fl pl20 cGray">
                            	来自 <a title="美国" href="">美国</a> 版问题
                            </span>
							 <a href="javascript:;" class="fr jsjubaoquestion" value="231578">举报</a>
                    	     </div>
                        <div class="clearfix mt10">
						<span class="fl">
						<span class="fl cGray pr5">分享到:</span>
                        <span class="fl" style="padding-top:1px;">

                        </span>
						</span>
						<span class="fr">
							<input type="button" value="回答" class="ui_btn_big jsjumptoanswer">
						</span>
					</div>

                    </div>
                </div>
                <div class="ask_detail_comment mt20">
                
                @if (Model.Answers.Count > 0)
                {
                    foreach (Answers a in Model.Answers)
                    {
                        Html.RenderPartial("AnswerItem", a);
                    }
                }

                <h4 class="fb f14 mt20 js_tmp">添加回答</h4>
                <a name="questionanswer" id="questionanswer"></a>
                    <div class="mod_discuss clearfix mt10">
                        @{
                            Answers newAnswer = new Answers();
                            newAnswer.Question = Model;
                            newAnswer.User = Session.User.ToUser();
                            
                            Html.RenderPartial("EditAnswer", newAnswer);
                        }
                    </div>
                </div>
            </div>

            <div class="clear"></div>
        </div>

  </div>

</div>